package com.satoken.Mapper;

import com.satoken.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {
    @Select("SELECT * FROM user WHERE username = #{username}")
    User getUserByUsername(String username);

    @Insert("INSERT INTO user VALUES(#{username},#{password})")
    int insertUser(User u);
}
